﻿//*** Guidance generated code ***//
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;
using System.Web.Routing;

namespace $safeprojectname$.Web
{
    /// <summary>
    ///     Description for button item
    /// </summary>
    public interface IButtonItem
    {
        /// <summary>
        ///     Unique name which identifies button and therefore MUST be set!
        ///     This property would be used instead of FormAction, Text or TextLocalized - if they are not provided
        /// </summary>
        string ButtonName { get; set; }

        /// <summary>
        ///     String key which should be used for Localization.
        ///     This is used if string.IsNullOrEmpty(TextLocalized)
        ///     If the Text property is not provided the ButtonName is used
        /// </summary>
        string Text { get; set; }

        /// <summary>
        ///     Already localized and Text for user
        /// </summary>
        string TextLocalized { get; set; }

        /// <summary>
        ///     Allows to set the FORM attributes 'id' and 'name' for JavaScript handling.
        ///     E.g. the default value for ButtonSubmit is "Constants.WebControls.MainFormId".
        ///     If null or mepty, attributes 'id' and 'name' are not rendered at all.
        /// </summary>
        string FormIdForJS { get; set; }

        /// <summary>
        ///     If set to true, button is rendered,
        ///     but not working (disabled)
        /// </summary>
        bool IsDisabled { get; set; }

        /// <summary>
        ///     Allows to append the title attribute with provided value.
        ///     The GetLoclized is called with value as a key
        /// </summary>
        string Title { get; set; }

        /// <summary>
        ///     1) if FormController exists = 'FormController/FormAction'
        ///     2) FormController is null or empty = 'Model.MasterModel.CurrentController/FormAction'
        ///     3) If FormAction is null or empty - ButtonName is used as the action name
        /// </summary>
        string FormAction { get; set; }

        /// <summary>
        ///     Allows to specify the Controller on which is the Action
        ///     which will this button's form target
        ///     The 'ButtonsWC' webControl will use the Model.MasterModel.ControllerName
        ///     in cases that this instance property FormController remains null or empty
        /// </summary>
        string FormController { get; set; }

        /// <summary>
        ///     Extend the Form Path with key-pair values.
        ///     If ActionValue.Is(), then is converted into the { id = ActionValue }
        /// </summary>
        RouteValueDictionary FormRouteValues { get; set; }

        /// <summary>
        ///     This is the switch for the MasterPage.
        ///     Every FORM tag must be closed. In cases, that the Page Or Control calls the
        ///     CreateForm() operation without its closing pair CloseForm()
        ///     (and therefore sets this property to IsFormTagClosed = true
        ///     MasterPage will (could) try to close this form inside of the div id="divBody"
        /// </summary>
        bool IsFormTagClosed { get; set; }
    }
}